import { findHomeCate } from '@/api/home'
export default {
  namespaced: true,
  state: () => {
    return {
      categoryList: []
    }
  },
  mutations: {
    setCategory (state, categoryList) {
      state.categoryList = categoryList
    }
  },
  actions: {
    async getCtategory (store) {
      const { result } = await findHomeCate()
      store.commit('setCategory', result)
    }
  }
}
